package com.xxx.mapper;

import com.xxx.pojo.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * mapper
 */
public interface UserMapper extends BaseMapper<User> {

	@Select("SELECT * FROM t_user WHERE user_name LIKE CONCAT('%',#{username},'%')")
	User getUserByName(@Param("username") String username);
	
	@Select("SELECT * FROM t_user WHERE user_id = #{userId}")
	User getUserById(@Param("userId") String userId);

}
